<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.w3.org/1999/xhtml">
<head>
    <meta charset="utf-8">
    <title>用户列表</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="format-detection" content="telephone=no">
    <link rel="stylesheet" href="resources/layui/css/layui.css" media="all" />
    <link rel="stylesheet" href="resources/css/public.css" media="all" />
</head>
<body class="childrenBody">

<!--编辑计划弹出层 ，我们这里名称写错了-->
<div style="padding: 10px;"  id="selectUserRoleDiv">
    <input type="hidden" id="planNo">
    <div class="layui-form-item layui-row layui-col-xs12">
        <label class="layui-form-label">日期<span style="color:red">* </span></label>
        <div class="layui-input-block">
            <input type="text" class="layui-input planDate" style="color: #a3b8c4" readonly="readonly" id="planDate" name="planDate" lay-verify="required" >
        </div>
    </div>
    <div class="layui-form-item layui-row layui-col-xs12">
        <label class="layui-form-label">计划项<span style="color:red">* </span></label>
        <div class="layui-input-block">
            <input type="text" class="layui-input planItem" id="planItem" name="planItem" lay-verify="required">
        </div>
    </div>
    <button type="button" class="layui-btn" id="savePlan" >确认修改</button>

</div>

<script type="text/javascript" src="resources/layui/layui.js"></script>
<script th:inline="none">
    layui.use(['form','layer','laydate','table','laytpl'],function(){
        var form = layui.form,
            layer = parent.layer === undefined ? layui.layer : top.layer,
            $ = layui.jquery,
            laydate = layui.laydate,
            laytpl = layui.laytpl,
            table = layui.table;


        $("#savePlan").click(function () {
            var planNo=$("#planNo").val();
            var planItem=$("#planItem").val();
            $.ajax({
                type:"POST",
                url:"updateDevPlan.do",
                data:{planNo:planNo,planItem:planItem},
                success:function (res) {
                    if(res.code=5005){
                        top.layer.msg(res.msg);
                        var index1=layui.layer.getFrameIndex(window.name)
                        layui.layer.close(index1);
                        parent.table.reload("devPlanListTable")
                    }else{
                        layer.msg(res.msg);
                    }
                }

            });
        });

    })

</script>
</body>
</html>